var Button =
{
    buttonID : "",
    method : "",
        
    registerMethod : function(id, method)
    {
        Button.buttonID = id;
        Button.method = method;
    },
    
    evalEnterMethod : function(ev)
    {
        ev = ev || window.event;
        
        if(ev.keyCode==13) {
            var button = document.getElementById(Button.buttonID);
            
            if(button) {
                button.focus();
                eval(Button.method);
                Common.cancelBubble(ev);                     
            }
        }
    }
}

Common.addEventListener(document, "keyup", Button.evalEnterMethod, true);